﻿using SqlSugar;

namespace LogCenterService.Models.Entity;

/// <summary>
/// 日志内容
/// </summary>
/// <remarks>
/// 表建好了就尽量不要去改他了，CodeFirst只执行一次就行了
/// 修改表结构后最好重启服务，不然会出现LOCK TABLE问题
/// </remarks>
public class LogContent
{
    /// <summary>
    /// 日志发生时间
    /// </summary>
    public DateTime TimeStamp { get; set; } = DateTime.Now;

    /// <summary>
    /// 日志级别
    /// </summary>
    [SugarColumn(ColumnDataType = "symbol")]
    public string Level { get; set; }

    /// <summary>
    /// 请求 ID
    /// </summary>
    [SugarColumn(ColumnDataType = "symbol")]
    public string TrackingId { get; set; }

    /// <summary>
    /// 路径
    /// </summary>
    [SugarColumn(ColumnDataType = "symbol")]
    public string Path { get; set; }

    /// <summary>
    /// 程序的来源标识
    /// </summary>
    [SugarColumn(ColumnDataType = "symbol")]
    public string Source { get; set; }

    /// <summary>
    /// 版本号
    /// </summary>
    [SugarColumn(ColumnDataType = "symbol")]
    public string Version { get; set; }
}